package com.example.springboot.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class Menu {
    private Integer id;
    @Length(message = "菜单名长度必须为4~10字符",min = 4, max = 10)
    @NotEmpty(message = "菜单名不能为空")
    @NotNull(message = "菜单名不能为空")
    private String name;
    private String url;
    private String level;
    private Integer pid;
}
